package com.vhuomai.store.provider;

import com.vhuomai.store.entity.BaseStoreConfig;
import com.vhuomai.store.exception.StoreException;

import java.io.InputStream;

/**
 * @author harris
 */
public interface StoreProvider {
    
    String saveFile(BaseStoreConfig config, byte[] content, String ext) throws StoreException;
    
    String saveFileByName(BaseStoreConfig config, byte[] content, String fileName) throws StoreException;
    
    boolean fileExist(BaseStoreConfig config, String url) throws StoreException;
    
    void remove(BaseStoreConfig config, String url) throws StoreException;
    
    InputStream getContent(BaseStoreConfig config, String url) throws StoreException;
}
